package com.refusea.train.config.filter

import org.springframework.boot.web.servlet.FilterRegistrationBean
import org.springframework.context.annotation.Bean
import org.springframework.context.annotation.Configuration

@Configuration
class FilterConfig {


    @Bean
    fun accessLogFilter(): FilterRegistrationBean<AccessLogFilter> {
        val registrationBean: FilterRegistrationBean<AccessLogFilter> = FilterRegistrationBean<AccessLogFilter>()
        registrationBean.order = 1
        registrationBean.filter = AccessLogFilter()
        registrationBean.addUrlPatterns("/*")
        return registrationBean
    }
}
